package com.lijing.mock.services;

import com.lijing.mock.constract.LocalConstant;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.MDC;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * mock 服务
 * @author by lijing
 * @date 2019/12/2 0002 16:01
 */
@Slf4j
@Service
public class MockServer {

    public String getMockResult(){
        String key = MDC.get(LocalConstant.mockUrlKey);
        if(StringUtils.isEmpty(key)){
            return "{\"error\":\"system error\"}";
        }
        return "{\"code\":100,\"data\":\"12233\"}";

    }


}
